package user;

import operation.*;

import java.util.Scanner;

public class NormalUser extends User{
    //提供构造方法帮助父类构造
    public NormalUser(String name) {
        super(name);
        //在new一般人员这个对象时，就把这些功能一并写入
        this.iOperations = new IOperation[]{
                new ExitOperation(),//0
                new FindOperation(),
                new BorrowOperation(),
                new ReturnOperation()
        };
    }

    //设置一个开始菜单
    public int menu (){
        System.out.println("hello"+this.name+"欢迎使用BMS!");

        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.归还图书");
        System.out.println("0.退出BNS");
        Scanner scanner = new Scanner(System.in);
        return scanner.nextInt();
    }
}
